//
//  DeleteSubDeviceApi.m
//  AFNetworking
//
//  Created by Henry on 2023/7/26.
//

#import "DeleteSubDeviceApi.h"
@interface DeleteSubDeviceApi()

@property(nonatomic,copy)NSString *sn;
@property(nonatomic,copy)NSString *subThingTypeName;
@end
@implementation DeleteSubDeviceApi

-(id)initWithDevId:(NSString *)thingName withThingTypeName:(NSString *)thingTypeName withSN:(NSString *)sn withSubDeviceThingTypeName:(NSString *)subThingTypeName{
    if(self = [super init]){
        self.thingName = thingName;
        self.thingTypeName = thingTypeName;
        self.sn = sn;
        self.subThingTypeName = subThingTypeName;
    }
    return self;
}


-(id)getTopic{
    return [NSString stringWithFormat:@"st/siterlink/%@/things/%@/to_dev",self.thingTypeName,self.thingName];
}

-(id)getCommandContent{
    return @{@"cmd":@2,@"sn":self.sn,@"dev_type":self.subThingTypeName};
}

-(id)getSubcribeTopic{
    return [NSString stringWithFormat:@"st/siterlink/%@/things/%@/from_dev",self.thingTypeName,self.thingName];
}



@end
